package com.foreknow.elmboot.mapper;



import com.foreknow.elmboot.po.Business;
import com.foreknow.elmboot.po.Food;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
 * @author 啊滨
 * @date 2023/2/13 16:09
 */

@Mapper//表明当前类需要使用到Mybatis的注解
public interface BusinessMapper {
    /**
     * 根据点餐分类编号查询所属商家信息
     * @param orderTypeId
     * @return
     * @throws
     */
    @Select("select * from business where orderTypeId=#{orderTypeId} order by businessId")
    public List<Business> listBusinessByOrderTypeId(int orderTypeId) ;

    /**
     * 根据商家编号查询商家信息
     * @param businessId
     * @return
     * @throws
     */
    @Select("SELECT * FROM business WHERE businessId=#{businessId}")
    public Business getBusinessById(int businessId) ;
}
